<!--<?php
require_once template('header'); 
print <<<EOT
<!--右边开始-->
<script language="javascript">
$(function(){
//生成代码
$("#make_code").click(function(e){
   if ($('#goods_nums').val() <= 0) {
      alert('js调用商品数量不能为0');
   }
    var url = '$js_url';
    url += '?cid='+$('#goods_category').val()+'&bid='+$('#goods_brand').val()+'&status='+$('#goods_status').val();
	url += '&show_img='+$('#show_img').val()+'&goods_nums='+$('#goods_nums').val()+'&order='+$('#show_order').val();
	url += '&charset='+$('#charset').val();
	$('#js_code')[0].value = '\<script src=\"' + url + '\"\>\</script\>';
	$("#code_show").load(url+'&act=ajax');
});
});
</script>
<div id="right">
	<table cellpadding="0" cellspacing="1" class="list1">
		<tr>
			<th width="4%">ID</th>
			<th width="36%">商品js调用代码</th>
			<th>$lang[operation]</th>
		</tr>
		<tr >
			<td>1</td>
			<td class="td_left1">商品分类</td>
			<td class="select1">$cat_menu</td>
		</tr>
		<tr >
			<td>2</td>
			<td class="td_left1">商品品牌</td>
			<td class="select1">$brand_menu</td>
		</tr>
		<tr >
			<td>3</td>
			<td class="td_left1">推荐类型</td>
			<td class="select1">$status_menu</td>
		</tr>
		<tr >
			<td>4</td>
			<td class="td_left1">是否显示商品图片</td>
			<td class="select1"><select name="show_img" id="show_img">
			<option value="0">否</option>
			<option value="1">是</option>
			</select></td>
		</tr>
		<tr >
			<td>5</td>
			<td class="td_left1">显示商品数量</td>
			<td>
			<input type="text" name="goods_nums" id="goods_nums" value="10" size="30" maxlength="255" class="text" /></td>
		</tr>
		<tr >
			<td>6</td>
			<td class="td_left1">商品排列方式</td>
			<td class="select1"><select name="show_order" id="show_order">
			   <option value="0">横排</option>
			   <option value="1">竖排</option>
			</select></td>
		</tr>
		<tr >
			<td>7</td>
			<td class="td_left1">编码方式</td>
			<td class="select1"><select name="charset" id="charset">
        	<option value="utf8">国际化编码（utf8）</option><option value="gb2312">简体中文</option>
			<option value="big5">繁体中文</option>
			</select></td>
		</tr>
		<tr >
			<td colspan="2"><input type="submit" name="make_code" id="make_code" value="&nbsp;生成代码&nbsp;"/></td>
			<td><textarea name="js_code" id="js_code" rows="5" cols="55" class="text"></textarea></td>
		</tr>
	</table>
	<div id="code_show"></div>
</div>
<!--
EOT;
?>-->